<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ page import = "java.util.Locale,org.apache.struts.Globals"%>
	
<table border="0" width="100%" height="100px" style="background-image:url('images/banner2.gif')">
  <tr>
     <td width="33%" align="left" valign="center">
		<logic:notEmpty name="userPrincipal">
				<span style="color:#333399;font-family:arial;font-size:8pt;font-weight:bold">
					<bean:message key="body.login.usuario"/>: <bean:write name="userPrincipal" property="username" />
				</span>
				<br>
				<a href="/logout.do">
					<span style="color:#333399;font-family:arial;font-size:8pt;font-weight:bold">
						Logout 
					</span>
				</a>
		</logic:notEmpty>

		<logic:empty name="userPrincipal" >
				<a href="/loginInput.do" >
					<span style="color:#333399;font-family:arial;font-size:8pt;font-weight:bold">
						Login 
					</span>
				</a>
		</logic:empty>

     </td>
     <td align="center" width="34%">
        &nbsp;
     </td>
     <td width="33%" align="right" valign="center">
        <%
        	Locale locale = (Locale)session.getAttribute(Globals.LOCALE_KEY);
        	if((locale == null) || (!locale.getLanguage().equals("en"))){
	        	out.println("<a href=\"/locale.do?locale=en\" style=\"color:#333399;font-family:arial;font-size:7pt;\"><img border=\"0\" src=\"/images/english.gif\"><br>English</a>");
        	}else{
        		out.println("<a href=\"/locale.do?locale=es\" style=\"color:#333399;font-family:arial;font-size:7pt;\"><img border=\"0\" src=\"/images/spanish.gif\"><br>Spanish</a>");
        	}
        %>
     </td>
  </tr>
</table>
